package servlets;

import java.io.*;

import javax.servlet.*;
import javax.servlet.http.*;
import com.sun.tools.internal.ws.processor.model.Response;
import model.*;
import java.util.Vector;

public class ShowApplications extends HttpServlet
{

	public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException
	{
		PrintWriter out = response.getWriter();
		int student_id = Integer.parseInt( request.getParameter("student_id") );
		StudentDBModel model = new StudentDBModel();
		Vector<String> apps = (Vector<String>)model.getApplication(student_id);
		
		
		
		//call method in model to get the application.
		
		//use out to print collected data from model
		for(int i=0; i<apps.size(); i++){
			out.println(apps.elementAt(i));
		}
	}
}
